﻿using Auth.Dtos.Base;
using Auth.Models;
using Auth.Models.Base;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Auth.Application.IServices.Base
{
    public interface IRoleService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>

        Task<Guid?> InsertAsync(RoleDto dto);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(RoleDto dto);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> UpdateAsync(RoleDto dto);

        /// <summary>
        /// 查询单条记录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<RoleDto> GetAsync(Guid id);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>

        Task<PagedList<RoleDto>> GetPagedListAsync(RoleModel model);

        /// <summary>
        /// 查询所有记录
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<IEnumerable<RoleDto>> CountAsync(RoleModel model);

        /// <summary>
        /// 查询记录
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<RoleDto>> GetAllAsync();
    }
}
